package com.cmcc.waf.report.core;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;

/**
 * <p>
 *
 * @author liang_jinxin
 * @date 2023/5/4
 */
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfig {

    @Bean
    public Docket webApiConfig() {
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(new ApiInfoBuilder()
                        .title("WAF指标")
                        .description("WAF指标Restful API")
                        .contact(new Contact("liang_jinxin", "", "liang_jinxin@venusgroup.com.cn"))
                        .version("2.0")
                        .build())
                .select()
                .build();
    }
}
